
package net.anzix.jimposition;

import java.util.HashMap;
import java.util.Map;
import javax.swing.JPanel;
import net.anzix.jimposition.transformations.*;

public abstract class BasicTransformation implements Transformation{
    private static int allid=0;
    private int id;
    private JPanel panel=null;
    private Map<String,Object> parameters = new HashMap<String,Object>();
    
    public BasicTransformation(){
        id = allid++;
   //     panel = createPanel();
    }
    public String getId() {
        return this.getClass().getName()+id;
    }
    public JPanel getPanel(){
        if (panel==null) panel = createPanel();
        return panel;
    }
    
    public JPanel createPanel(){
        return new NoSettingsPanel();    
    }
    
    public Object getAttribute(String key){
        return parameters.get(key);
    }
    public void setAttribute(String key,Object value){
        parameters.put(key,value);
    }
    
    
            
    
}
